/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.api.agricultural.machinery.entity;

import org.hibernate.validator.constraints.Length;
import java.util.Date;

import javax.validation.Valid;

import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;
import com.jeesite.common.utils.excel.annotation.ExcelField;
import com.jeesite.common.utils.excel.annotation.ExcelFields;
import com.jeesite.common.utils.excel.annotation.ExcelField.Align;

/**
 * 农机管理Entity
 * @author zpp
 * @version 2020-03-21
 */
@Table(name="t_agricultural_machinery", alias="a", columns={
		@Column(name="id", attrName="id", label="主键", isPK=true),
		@Column(name="machinery_no", attrName="machineryNo", label="农机编号"),
		@Column(name="big_category", attrName="bigCategory", label="农机大类"),
		@Column(name="small_category", attrName="smallCategory", label="农机小类"),
		@Column(name="item", attrName="item", label="农机品目"),
		@Column(name="terminal_type", attrName="terminalType", label="终端类型"),
		@Column(name="producte_date", attrName="producteDate", label="出厂日期"),
		@Column(includeEntity=DataEntity.class),
		@Column(name="model_no", attrName="modelNo", label="农机型号"),
		@Column(name="engine_number", attrName="engineNumber", label="发动机编号"),
		@Column(name="rated_power", attrName="ratedPower", label="额定功率"),
		@Column(name="product_name", attrName="productName", label="农机产品名称", queryType=QueryType.LIKE),
		@Column(name="product_model", attrName="productModel", label="农机产品型号"),
		@Column(name="factory_number", attrName="factoryNumber", label="出厂编号"),
		@Column(name="rack_number", attrName="rackNumber", label="机架号"),
		@Column(name="terminal_number", attrName="terminalNumber", label="终端编号"),
		@Column(name="manufacturer_name", attrName="manufacturerName", label="终端企业名称", queryType=QueryType.LIKE),
		@Column(name="terminal_product", attrName="terminalProduct", label="终端产品名称"),
		@Column(name="province", attrName="province", label="省级编码"),
		@Column(name="municipal", attrName="municipal", label="市级编码"),
		@Column(name="district_county", attrName="districtCounty", label="区县级编码"),
		@Column(name="township", attrName="township", label="乡镇级编码"),
		@Column(name="horsepower", attrName="horsepower", label="马力范围"),
		@Column(name="address_buyer", attrName="addressBuyer", label="购机者地址"),
		@Column(name="cooperative", attrName="cooperative", label="归属合作社"),
		@Column(name="terminal_model", attrName="terminalModel", label="终端产品型号"),
		@Column(name="buyer_category", attrName="buyerCategory", label="购机者类别"),
		@Column(name="organization_name", attrName="organizationName", label="合作组织名称", queryType=QueryType.LIKE),
		@Column(name="legal_person", attrName="legalPerson", label="法人"),
		@Column(name="social_credit_code", attrName="socialCreditCode", label="统一社会信用代码"),
	}, orderBy="a.update_date DESC"
)
public class AgriculturalMachinery extends DataEntity<AgriculturalMachinery> {
	
	private static final long serialVersionUID = 1L;
	private String machineryNo;		// 农机编号
	private String bigCategory;		// 农机大类
	private String smallCategory;		// 农机小类
	private String item;		// 农机品目
	private String terminalType;		// 终端类型
	private Date producteDate;		// 出厂日期
	private String modelNo;		// 农机型号
	private String engineNumber;		// 发动机编号
	private Double ratedPower;		// 额定功率
	private String productName;		// 农机产品名称
	private String productModel;		// 农机产品型号
	private String factoryNumber;		// 出厂编号
	private String rackNumber;		// 机架号
	private String terminalNumber;		// 终端编号
	private String manufacturerName;		// 终端企业名称
	private String terminalProduct;		// 终端产品名称
	private String province;		// 省级编码
	private String municipal;		// 市级编码
	private String districtCounty;		// 区县级编码
	private String township;		// 乡镇级编码
	private Double horsepower;		// 马力范围
	private String addressBuyer;		// 购机者地址
	private String cooperative;		// 归属合作社
	private String terminalModel;		// 终端产品型号
	private String buyerCategory;		// 购机者类别
	private String organizationName;		// 合作组织名称
	private String legalPerson;		// 法人
	private String socialCreditCode;		// 统一社会信用代码
	
	public AgriculturalMachinery() {
		this(null);
	}

	public AgriculturalMachinery(String id){
		super(id);
	}
	@Override
	@Valid
	@ExcelFields({
		@ExcelField(title="农机编号", attrName="machineryNo", align=Align.CENTER, sort=1),
		@ExcelField(title="农机大类", attrName="bigCategory", align=Align.CENTER, sort=10),
		@ExcelField(title="农机小类", attrName="smallCategory", align=Align.CENTER, sort=20),
		@ExcelField(title="农机品目", attrName="item", align=Align.CENTER, sort=30),
		@ExcelField(title="终端类型", attrName="terminalType", align=Align.CENTER, sort=40),
		@ExcelField(title="出厂日期", attrName="producteDate", align=Align.CENTER, sort=50),
		@ExcelField(title="农机型号", attrName="modelNo", align=Align.CENTER, sort=60),
		@ExcelField(title="发动机编号", attrName="engineNumber", align=Align.CENTER, sort=70),
		@ExcelField(title="额定功率", attrName="ratedPower", align=Align.CENTER, sort=80),
		@ExcelField(title="农机产品名称", attrName="productName", align=Align.CENTER, sort=90),
		@ExcelField(title="农机产品型号", attrName="productModel", align=Align.CENTER, sort=100),
		@ExcelField(title="出厂编号", attrName="factoryNumber", align=Align.CENTER, sort=110),
		@ExcelField(title="机架号", attrName="rackNumber", align=Align.CENTER, sort=120),
		@ExcelField(title="终端编号", attrName="terminalNumber", align=Align.CENTER, sort=130),
		@ExcelField(title="终端企业名称", attrName="manufacturerName", align=Align.CENTER, sort=140),
		@ExcelField(title="终端产品名称", attrName="terminalProduct", align=Align.CENTER, sort=150),
		@ExcelField(title="省级编码", attrName="province", align=Align.CENTER, sort=160),
		@ExcelField(title="市级编码", attrName="municipal", align=Align.CENTER, sort=170),
		@ExcelField(title="区县级编码", attrName="districtCounty", align=Align.CENTER, sort=180),
		@ExcelField(title="乡镇级编码", attrName="township", align=Align.CENTER, sort=190),
		@ExcelField(title="马力范围", attrName="horsepower", align=Align.CENTER, sort=200),
		@ExcelField(title="购机者地址", attrName="addressBuyer", align=Align.CENTER, sort=210),
		@ExcelField(title="归属合作社", attrName="cooperative", align=Align.CENTER, sort=220),
		@ExcelField(title="终端产品型号", attrName="terminalModel", align=Align.CENTER, sort=230),
		@ExcelField(title="购机者类别", attrName="buyerCategory", align=Align.CENTER, sort=240),
		@ExcelField(title="合作组织名称", attrName="organizationName", align=Align.CENTER, sort=250),
		@ExcelField(title="法人", attrName="legalPerson", align=Align.CENTER, sort=260),
		@ExcelField(title="统一社会信用代码", attrName="socialCreditCode", align=Align.CENTER, sort=270),
	})
	public String getId() {
		return super.getId();
	}
	@Length(min=0, max=100, message="农机编号长度不能超过 100 个字符")
	public String getMachineryNo() {
		return machineryNo;
	}

	public void setMachineryNo(String machineryNo) {
		this.machineryNo = machineryNo;
	}
	
	@Length(min=0, max=50, message="农机大类长度不能超过 50 个字符")
	public String getBigCategory() {
		return bigCategory;
	}

	public void setBigCategory(String bigCategory) {
		this.bigCategory = bigCategory;
	}
	
	@Length(min=0, max=50, message="农机小类长度不能超过 50 个字符")
	public String getSmallCategory() {
		return smallCategory;
	}

	public void setSmallCategory(String smallCategory) {
		this.smallCategory = smallCategory;
	}
	
	@Length(min=0, max=30, message="农机品目长度不能超过 30 个字符")
	public String getItem() {
		return item;
	}

	public void setItem(String item) {
		this.item = item;
	}
	
	@Length(min=0, max=30, message="终端类型长度不能超过 30 个字符")
	public String getTerminalType() {
		return terminalType;
	}

	public void setTerminalType(String terminalType) {
		this.terminalType = terminalType;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getProducteDate() {
		return producteDate;
	}

	public void setProducteDate(Date producteDate) {
		this.producteDate = producteDate;
	}
	
	@Length(min=0, max=50, message="农机型号长度不能超过 50 个字符")
	public String getModelNo() {
		return modelNo;
	}

	public void setModelNo(String modelNo) {
		this.modelNo = modelNo;
	}
	
	@Length(min=0, max=50, message="发动机编号长度不能超过 50 个字符")
	public String getEngineNumber() {
		return engineNumber;
	}

	public void setEngineNumber(String engineNumber) {
		this.engineNumber = engineNumber;
	}
	
	public Double getRatedPower() {
		return ratedPower;
	}

	public void setRatedPower(Double ratedPower) {
		this.ratedPower = ratedPower;
	}
	
	@Length(min=0, max=50, message="农机产品名称长度不能超过 50 个字符")
	public String getProductName() {
		return productName;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}
	
	@Length(min=0, max=50, message="农机产品型号长度不能超过 50 个字符")
	public String getProductModel() {
		return productModel;
	}

	public void setProductModel(String productModel) {
		this.productModel = productModel;
	}
	
	@Length(min=0, max=50, message="出厂编号长度不能超过 50 个字符")
	public String getFactoryNumber() {
		return factoryNumber;
	}

	public void setFactoryNumber(String factoryNumber) {
		this.factoryNumber = factoryNumber;
	}
	
	@Length(min=0, max=50, message="机架号长度不能超过 50 个字符")
	public String getRackNumber() {
		return rackNumber;
	}

	public void setRackNumber(String rackNumber) {
		this.rackNumber = rackNumber;
	}
	
	@Length(min=0, max=50, message="终端编号长度不能超过 50 个字符")
	public String getTerminalNumber() {
		return terminalNumber;
	}

	public void setTerminalNumber(String terminalNumber) {
		this.terminalNumber = terminalNumber;
	}
	
	@Length(min=0, max=50, message="终端企业名称长度不能超过 50 个字符")
	public String getManufacturerName() {
		return manufacturerName;
	}

	public void setManufacturerName(String manufacturerName) {
		this.manufacturerName = manufacturerName;
	}
	
	@Length(min=0, max=50, message="终端产品名称长度不能超过 50 个字符")
	public String getTerminalProduct() {
		return terminalProduct;
	}

	public void setTerminalProduct(String terminalProduct) {
		this.terminalProduct = terminalProduct;
	}
	
	@Length(min=0, max=50, message="省级编码长度不能超过 50 个字符")
	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}
	
	@Length(min=0, max=50, message="市级编码长度不能超过 50 个字符")
	public String getMunicipal() {
		return municipal;
	}

	public void setMunicipal(String municipal) {
		this.municipal = municipal;
	}
	
	@Length(min=0, max=50, message="区县级编码长度不能超过 50 个字符")
	public String getDistrictCounty() {
		return districtCounty;
	}

	public void setDistrictCounty(String districtCounty) {
		this.districtCounty = districtCounty;
	}
	
	@Length(min=0, max=50, message="乡镇级编码长度不能超过 50 个字符")
	public String getTownship() {
		return township;
	}

	public void setTownship(String township) {
		this.township = township;
	}
	
	public Double getHorsepower() {
		return horsepower;
	}

	public void setHorsepower(Double horsepower) {
		this.horsepower = horsepower;
	}
	
	@Length(min=0, max=255, message="购机者地址长度不能超过 255 个字符")
	public String getAddressBuyer() {
		return addressBuyer;
	}

	public void setAddressBuyer(String addressBuyer) {
		this.addressBuyer = addressBuyer;
	}
	
	@Length(min=0, max=200, message="归属合作社长度不能超过 200 个字符")
	public String getCooperative() {
		return cooperative;
	}

	public void setCooperative(String cooperative) {
		this.cooperative = cooperative;
	}
	
	@Length(min=0, max=50, message="终端产品型号长度不能超过 50 个字符")
	public String getTerminalModel() {
		return terminalModel;
	}

	public void setTerminalModel(String terminalModel) {
		this.terminalModel = terminalModel;
	}
	
	@Length(min=0, max=50, message="购机者类别长度不能超过 50 个字符")
	public String getBuyerCategory() {
		return buyerCategory;
	}

	public void setBuyerCategory(String buyerCategory) {
		this.buyerCategory = buyerCategory;
	}
	
	@Length(min=0, max=100, message="合作组织名称长度不能超过 100 个字符")
	public String getOrganizationName() {
		return organizationName;
	}

	public void setOrganizationName(String organizationName) {
		this.organizationName = organizationName;
	}
	
	@Length(min=0, max=50, message="法人长度不能超过 50 个字符")
	public String getLegalPerson() {
		return legalPerson;
	}

	public void setLegalPerson(String legalPerson) {
		this.legalPerson = legalPerson;
	}
	
	@Length(min=0, max=100, message="统一社会信用代码长度不能超过 100 个字符")
	public String getSocialCreditCode() {
		return socialCreditCode;
	}

	public void setSocialCreditCode(String socialCreditCode) {
		this.socialCreditCode = socialCreditCode;
	}
	
}